home *** CD-ROM | disk | FTP | other *** search
- // file : ribHorn1.pop
- // the ribHorn form has the same top level structure as a normal horn form,
- // but it's ribs are made up of reflected sub-horns
-
-
- /////////////////////////////////
- // population display settings //
- /////////////////////////////////
-
- population 0
- dimensions = 1
- colour_model RGB
- render_quality flat
-
-
- ////////////
- // genome //
- ////////////
-
- genome 0 {
-
- ////////////////
- // initialise //
- ////////////////
-
- // initialise scaling
- eggScale( 1 : 0.5 : 1 ), // allow smaller primitives than standard
-
- // initialise material properties
- setColour( hsv<.5,.5,.75> : hsv<0,.2,.5> : hsv<.99999,.99999,.99999> ),
- setTexture( norder false:toggle ),
- setBitmap( norder 0 : 0 : 20 ),
- *setWrap( norder 0 : 0 : 2 ),
-
- ///////////////
- // horn loop //
- ///////////////
-
- repeat( 1 : 1 : 40, // #horn-segments
-
- // horn-segment code is made up of 2 distinct code blocks; the first block is executed
- // within a new scope, called the "segment rib"; the second block is executed within
- // the current scope and is called the "segment spine"
- join(
-
- /////////
- // rib //
- /////////
-
- scope(
- // rotate so that rib does not point in same direction as the spine
- rotate( <0,1.570796,0> : <0,-2,0> : <0,2,0> ),
- // move away from spine slightly
- forward( 0 : -3 : 3 ),
- // re-shape primitive
- eggVectorScale( <1,1,1> : <.75,.75,.75> : <1.25,1.25,1.25> ),
- // determine primitive type
- egg( 0 : 0 : 10 ),
-
- // lay an (enlarged) egg, (ie. visual for this spine segment)
- *scope(
- eggVectorScale( <1.5,1.5,1.5> : <1,1,1> : <10,10,10>),
- egg( 2 : 0 : 10 ),
- lay
- ),
-
- // in this form the rib visually consists of a reflected sub-horn
- reflect( <1,1,-1> : <-1,-1,-1> : <1,1,1>,
- ///////////////////////////
- // rib visual : sub horn //
- ///////////////////////////
- join(
-
- // initialise material properties
- setColour( hsv<.5,.5,.75> : hsv<0,.2,.5> : hsv<.99999,.99999,.99999> ),
- setTexture( norder false:toggle ),
- setBitmap( norder 0 : 0 : 20 ),
- *setWrap( norder 0 : 0 : 2 ),
-
- ///////////////
- // horn loop //
- ///////////////
-
- repeat( 1 : 1 : 40, // #sub-horn-segments
-
- // horn-segment code is made up of 2 distinct code blocks; the first block is executed
- // within a new scope, called the "segment rib"; the second block is executed within
- // the current scope and is called the "segment spine"
- join(
-
- /////////////
- // sub-rib //
- /////////////
-
- // in this horn the rib visually consists of a single primtive
- scope(
- // rotate so that rib does not point in same direction as the spine
- rotate( <0,0,0> : <-2,-2,-2> : <2,2,2> ),
- // move away from spine slightly
- forward( 0 : -2 : 2 ),
- // re-shape primitive
- eggVectorScale( <1,1,1> : <.75,.75,.75> : <1.25,1.25,1.25> ),
- // determine primitive type and lay an egg
- egg( 0 : 0 : 10 ),
- lay
- ),
-
- ///////////////
- // sub-spine //
- ///////////////
-
- // updates the turtle state ready for the next segment
- move( <.5,0,0> : <-1,-1,-1> : <1,1,1> ),
- scale( 1.05 : 1.01 : 1.1 ),
- bankLeft( dtor(10 : -25 : 25) ),
- noseUp( dtor(10 : -25 : 25) ),
- moveHue( 0.01 : 0.005 : 0.05 ),
- scale( 1 : 0.9 : 1.1 )
- )
- ) // end sub-horn repeat loop
- ) // end reflected-join block
- ) // end reflect
- ), // end rib-scope
-
- ///////////
- // spine //
- ///////////
-
- // updates the turtle state ready for the next segment
- forward( 1 : -1 : 1 ),
- scale( 1.05 : 1.01 : 1.1 ),
- noseUp( dtor(10 : -25 : 25) ),
- moveHue( 0.01 : 0.005 : 0.05 ),
- scale( 1 : 0.9 : 1.1 )
- )
- )
- }
-
-
- // eof : ribHorn1.pop
-
-